package com.k8.rpc.invoke;

import com.k8.common.Destructible;
import com.k8.common.annotation.SPI;
import com.k8.common.factroy.BeanFactory;
import com.k8.rpc.exchange.Exchange;
import com.k8.rpc.invoke.Invoker;
import com.k8.rpc.url.URL;

/**
 * @Author: k8
 * @CreateTime: 2025-03-26
 * @Version: 1.0
 * 如果需要对Invoker动态代理，则继承AbstractInvokerBuilder
 */
@SPI
public interface InvokerBuilder {

    <T> Invoker<T> buildProvider(Class<T> type, T target, URL url, BeanFactory beanFactory);

    <T> Invoker<T> buildConsumer(Class<T> type, URL serviceInstanceUrl, Exchange exchange);
}

